Skip to content

Elastic Search After Support#1597

Draft
stefangutica wants to merge 2 commits intodevelopmentfrom
search-after-support
Draft

Elastic Search After Support#1597
stefangutica wants to merge 2 commits intodevelopmentfrom
search-after-support

Conversation

@stefangutica
Copy link
Copy Markdown
Collaborator

Reasoning

  • Added support for deep pagination using searchAfter to avoid large-offset pagination limitations.
  • Aligned API behavior so searchAfter is used only on routes that actually reach Elastic list queries.
  • Prepared the implementation for the Elastic package update where getList natively supports searchAfter.

Proposed Changes

  • Propagated searchAfter through endpoint/service flows that reach elastic.indexer.service -> getList.
  • Added per-item cursor support so each returned entity includes its own searchAfter (base64) value.
  • Removed or avoided searchAfter on routes that do not use getList, to prevent misleading API behavior.
  • Kept changes compatible with the upcoming Elastic package update for explicit getList(..., searchAfter) support.

How to test

  • Call a getList-backed endpoint with size + searchAfter and verify the next page is returned correctly.
  • Verify each returned entity item contains a valid searchAfter (base64) cursor.
  • Confirm routes that do not use getList no longer rely on searchAfter.
  • After upgrading the Elastic package, re-run pagination tests to validate native searchAfter forwarding on getList.

@stefangutica stefangutica marked this pull request as draft April 7, 2026 13:23
@github-actions
Copy link
Copy Markdown

k6 load testing comparison.
Base Commit Hash: 79b2062
Target Commit Hash: b74c3e8

Metric Base Target Diff
AvgMax9095AvgMax9095AvgMax9095
Mex61.25439.7158.4784.6978.222314.90174.16242.58+27.71% 🔴+426.46% 🔴+197.85% 🔴+186.45% 🔴
Accounts65.15723.3658.67102.4178.942164.06177.25243.51+21.16% 🔴+199.17% 🔴+202.10% 🔴+137.78% 🔴
Tokens62.18487.8958.6689.8080.562367.35184.77244.37+29.57% 🔴+385.22% 🔴+214.97% 🔴+172.13% 🔴
Blocks69.37874.7059.70140.36100.152323.35277.37325.04+44.38% 🔴+165.62% 🔴+364.59% 🔴+131.58% 🔴
Transactions81.662135.2759.21126.7795.813663.5560.9592.00+17.33% 🔴+71.57% 🔴+2.95% 🔴-27.43% ✅
Nodes62.18586.1758.5688.82564.1432142.80125.02177.07+807.24% 🔴+5383.51% 🔴+113.48% 🔴+99.36% 🔴
Pool62.00440.4158.6689.0180.212384.25184.48243.50+29.38% 🔴+441.37% 🔴+214.47% 🔴+173.55% 🔴
Test Run Duration60004.0560004.72

Legend: Avg - Average Response Time, Max - Maximum Response Time, 90 - 90th Percentile, 95 - 95th Percentile
All times are in milliseconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant